//go:build linux
// +build linux

package service

import "gitee.com/liumou_site/logger"

// InstallService 安装Linux系统服务
func InstallService(serviceName string, interval int) error {
	logger.Info("正在安装Linux systemd服务: %s", serviceName)
	service := NewServiceLinux(serviceName, interval)
	return service.Create()
}

// UninstallService 卸载Linux系统服务
func UninstallService(serviceName string) error {
	logger.Info("正在卸载Linux systemd服务: %s", serviceName)
	service := NewServiceLinux(serviceName, 0)
	return service.Remove()
}